<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <body>

        <ui:composition template="./../public/templateOK.xhtml">

            <ui:define name="detalhes">

                <script type="text/javascript">

                    shortcut.add("f10", function()
                    {
                        document.getElementById('geral:btnSalvar').click()
                    });
                    shortcut.add("Insert", function()
                    {
                        document.getElementById('geral:btnNovo').click()
                    });
                    shortcut.add("Esc", function()
                    {
                        document.getElementById('geral:btnVoltar').click()
                    });
                    shortcut.add("f10", function()
                    {
                        document.getElementById('geral:btnSalvar2').click()
                    });
                    shortcut.add("Insert", function()
                    {
                        document.getElementById('geral:btnNovo2').click()
                    });
                    shortcut.add("Esc", function()
                    {
                        document.getElementById('geral:btnVoltar2').click()
                    });
                    shortcut.add("f10", function()
                    {
                        document.getElementById('geral:btnSalvar3').click()
                    });
                    shortcut.add("Insert", function()
                    {
                        document.getElementById('geral:btnNovo3').click()
                    });
                    shortcut.add("Esc", function()
                    {
                        document.getElementById('geral:btnVoltar3').click()
                    });
                    shortcut.add("Esc", function()
                    {
                        document.getElementById('geral:btnVoltar4').click()
                    });
                    shortcut.add("Esc", function()
                    {
                        document.getElementById('geral:btnVoltar5').click()
                    });
                </script>



                <p:panel header="#{albumBean.titulo}">

                    <h:panelGroup id="pnlProcesso">

                        <h:panelGroup id="lista" rendered='#{albumBean.renderLista == "1"}'> 
                            <ui:include src="listarAlbum.xhtml"/>
                        </h:panelGroup>

                        <h:panelGroup id="formulario" rendered='#{albumBean.renderLista == "2"}'>

                            <ui:include src="cadastroAlbum.xhtml" />
                        </h:panelGroup>
                        
                         <h:panelGroup id="listaDisco" rendered='#{albumBean.renderLista == "3"}'> 
                            <ui:include src="listarDisco.xhtml"/>
                        </h:panelGroup>

                        <h:panelGroup id="formularioDisco" rendered='#{albumBean.renderLista == "4"}'>

                            <ui:include src="cadastroDisco.xhtml" />
                        </h:panelGroup>
                        
                        <h:panelGroup id="listaMusica" rendered='#{albumBean.renderLista == "5"}'> 
                            <ui:include src="listarMusica.xhtml"/>
                        </h:panelGroup>

                        <h:panelGroup id="formularioMusica" rendered='#{albumBean.renderLista == "6"}'>

                            <ui:include src="cadastroMusica.xhtml" />
                        </h:panelGroup>

                        <h:panelGroup id="excluirAlbum" rendered='#{albumBean.renderLista == "7"}'>
                            <ui:include src="excluirAlbum.xhtml" />
                        </h:panelGroup>
                        
                        <h:panelGroup id="excluirDisco" rendered='#{albumBean.renderLista == "8"}'> 
                            <ui:include src="excluirDisco.xhtml"/>
                        </h:panelGroup>

                        <h:panelGroup id="excluirMusica" rendered='#{albumBean.renderLista == "9"}'>

                            <ui:include src="excluirMusica.xhtml" />
                        </h:panelGroup>
                    </h:panelGroup>

                </p:panel>
            </ui:define>

        </ui:composition>

    </body>
</html>
